package com.wuyoucar.controller;

import com.wuyoucar.common.ResultBean;
import com.wuyoucar.service.InMailservice;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: jiangdz
 * @ProjectName: mywuyou_car
 * @Package: com.wuyoucar.controller
 * @ClassName: MailsController
 * @Description:
 * @Date: 2020-09-23  16:51
 * @UpdateUser: asus
 * @UpdateDate: 2020-09-23  16:51
 * @UpdateRemark: [说明本次修改内容]
 * @Version: [v1.0]
 * @Since JDK 1.8
 */
@RestController
@RequestMapping("/mails")
public class MailsController {
    @Autowired
    private InMailservice inMailservice;

    @RequestMapping("/getCode")
    public ResultBean getCode(String to) {
        return inMailservice.getCode(to);
    }

    @RequestMapping("/updateMail")
    public ResultBean updateMail(String to, String code,int userid) {
        return inMailservice.udateMail(to, code,userid);
    }

}
